﻿using DongFangGuoKai.WMSPlatform.Domain.Model;
using DongFangGuoKai.WMSPlatform.Service.User.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DongFangGuoKai.WMSPlatform.Service.User
{
    public interface IUserService
    {
        /// <summary>
        /// 判断登录
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        TUsers GetLogin(LoginPDADTO pDADTO);

        /// <summary>
        /// 用户显示
        /// </summary>
        /// <param name="uname">用户名</param>
        /// <param name="rid">角色</param>
        /// <param name="state">状态</param>
        /// <returns></returns>
        List<TUsers> GetUserList(string uname, int rid, int state, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddUser(UserRoleDto m);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        bool DelUser(int uid);

        /// <summary>
        /// 批量删除用户
        /// </summary>
        /// <param name="ulist"></param>
        /// <returns></returns>
        bool DelUsers(List<TUsers> ulist);

        /// <summary>
        /// 根据主键获取用户信息
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        UserRoleDto URById(int uid);

        /// <summary>
        /// 修改用户
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdUser(UserRoleDto m);


        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UserResetPwd(ResetPwdDto m);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UserModifyPwd(ModifyPwdDto m);

        /// <summary>
        /// 修改用户状态
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdUserStatus(UpdStatusDto m);
    }
}
